//
//  ViewController.m
//  cell
//
//  Created by Sich on 16/11/28.
//  Copyright © 2016年 sicuihuan. All rights reserved.
//

#import "ViewController.h"
#import "TestViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    UIButton *dateLab = [[UIButton alloc] initWithFrame:CGRectMake(50,100,200,50)];
    dateLab.backgroundColor = [UIColor yellowColor];
    dateLab.layer.cornerRadius = 17;
    [dateLab setTitle:@"进入" forState:UIControlStateNormal];
    [dateLab setTitleColor:[UIColor blueColor] forState:UIControlStateNormal];
    dateLab.titleLabel.font = [UIFont systemFontOfSize:15];
    dateLab.layer.masksToBounds = YES;
    [dateLab addTarget:self action:@selector(themeCk:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:dateLab];
    
    UILabel *biaoti = [[UILabel alloc] initWithFrame:CGRectMake(20, 200, 280, 300)];
    biaoti.text = @"本程序关于适配，其中第一段cell：单独的cell上的label适配 ；第二段cell：是Masonry的循环布局;第三个cell：上面控件用Masonry自适应，下面控件不用";
    biaoti.textAlignment = NSTextAlignmentCenter;
    biaoti.backgroundColor = [UIColor yellowColor];
    biaoti.font = [UIFont systemFontOfSize:19];
    biaoti.textColor = [UIColor redColor];
    biaoti.numberOfLines = 0;
    [self.view  addSubview:biaoti];
    
    
}
- (void)themeCk:(UIButton *)btn{
    TestViewController *Test = [[TestViewController alloc] init];
    [self.navigationController pushViewController:Test animated:YES];
}

@end
